/**
 * All rights reserved by www.xandroid.cn
 */
package xfok.net.xandroid.examples;

import xfok.net.xandroid.R;
import android.app.TabActivity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.widget.TabHost;

/**
 * @author YangHua
 *  转载请注明出处：http://www.xfok.net/android/201005/13.html
 * 2010-5-20 www.xandroid.cn 
 */
public class Tabs extends TabActivity {
	@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        TabHost tabHost = getTabHost();      
        LayoutInflater.from(this).inflate(R.layout.tabs, tabHost.getTabContentView(), true);
        tabHost.addTab(tabHost.newTabSpec("tab1")
                .setIndicator("tab1")
                .setContent(R.id.view1));
        tabHost.addTab(tabHost.newTabSpec("tab3")
                .setIndicator("tab2")
                .setContent(R.id.view2));
        tabHost.addTab(tabHost.newTabSpec("tab3")
                .setIndicator("tab3")
                .setContent(R.id.view3));
    }
}
